package com.ruoyi.service.fanruan.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.domain.jpjs.common.fanruan.WlFirst;
import com.ruoyi.mapper.fanruan.WlFirstMapper;
import com.ruoyi.service.fanruan.IWlFirstService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 文旅集团Service业务层处理
 *
 * @author ruoyi
 * @date 2020-11-04
 */
@Service
@Transactional(rollbackFor = Exception.class)
@DataSource(value = DataSourceType.SLAVE)
public class WlFirstServiceImpl implements IWlFirstService
{
    @Autowired
    private WlFirstMapper wlFirstMapper;

    /**
     * 查询文旅集团
     *
     * @param id 文旅集团ID
     * @return 文旅集团
     */
    @Override
    public WlFirst selectWlFirstById(Long id)
    {
        return wlFirstMapper.selectWlFirstById(id);
    }

    /**
     * 查询文旅集团列表
     *
     * @param wlFirst 文旅集团
     * @return 文旅集团
     */
    @Override
    public List<WlFirst> selectWlFirstList(WlFirst wlFirst)
    {
        return wlFirstMapper.selectWlFirstList(wlFirst);
    }

    /**
     * 新增文旅集团
     *
     * @param wlFirst 文旅集团
     * @return 结果
     */
    @Override
    public int insertWlFirst(WlFirst wlFirst)
    {
        return wlFirstMapper.insertWlFirst(wlFirst);
    }

    /**
     * 修改文旅集团
     *
     * @param wlFirst 文旅集团
     * @return 结果
     */
    @Override
    public int updateWlFirst(WlFirst wlFirst)
    {
        return wlFirstMapper.updateWlFirst(wlFirst);
    }

    /**
     * 删除文旅集团对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWlFirstByIds(String ids)
    {
        return wlFirstMapper.deleteWlFirstByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除文旅集团信息
     *
     * @param id 文旅集团ID
     * @return 结果
     */
    @Override
    public int deleteWlFirstById(Long id)
    {
        return wlFirstMapper.deleteWlFirstById(id);
    }
}
